<?PHP
include "config.php";
$connect = mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die(mysql_error());
mysql_select_db($mysql_db);
if (file_exists('install.php'))
{
	echo('If you have not yet installed QuickPage, click <a href="install.php">here</a>. If you already installed QuickPage, delete install.php and this script will run.');
}
else
{
$pageid=$_GET['pageid'];

if ($pageid=="")
{
	echo 'You must enter the web address: ' . $sitebase . 'showpage.php?pageid=<b>PAGEID</b>
	<br>
	<br>
	If you want to create a page, click <a href="index.php">here</a>.
	';
}

else
{
	$query = ("SELECT * FROM pages WHERE Page_ID = $pageid");
	$result = mysql_query($query) or die(mysql_error());
	while($row = mysql_fetch_array($result))
  {
  	echo $row['Content'] ;
 	echo "<br /><br />";
	echo '
	</html>
	<html>
	<hr>
	<a href="index.php">Create your own page</a> <font size=1><i><b>Page powered by Nexo QuickPage.</b></i></font>';
  }
};
};
?>